Calibration system to correct printhead misalignments

ABSTRACT

Apparatus and techniques are disclosed for aligning the operation of the ink jet printhead cartridges of a multiple printhead ink jet swath printer that includes a print carriage that is movable along a horizontal carriage scan axis, (b) first and second ink jet printhead cartridges supported by the movable carriage for printing onto a print media that is selectively movable along a vertical media scan axis, and (c) an optical sensor supported by the movable carriage. The optical sensor includes a quad photodiode detector whose outputs are indicative of the horizontal positions of vertical test lines imaged on the detector in conjunction with horizontal alignment correction, as well as the vertical positions of horizontal test lines imaged on the detector in conjunction with vertical alignment correction

CROSS REFERENCE TO RELATED APPLICATION(S)

This is a divisional of copending application Ser. No. 08/885,337 filedon Jun. 30, 1997, now U.S. Pat. No. 6,161,914, which is a continuationof application Ser. No. 08/200,101, filed Feb. 22, 1994, now U.S. Pat.No. 5,644,344, in turn a continuation of application Ser. No.07/786,145, filed Oct. 31, 1991, now U.S. Pat. No. 5,289,208.

BACKGROUND OF THE INVENTION

The subject invention is generally directed to swath type printers, andmore particularly to apparatus and techniques for vertical andhorizontal alignment of the printheads of a multiple printhead swathtype printer.

A swath printer is a raster or matrix type printer that is capable ofprinting a plurality of rows of dots in a single scan of a movable printcarriage across the print media. The print carriage of a swath printertypically includes a plurality of printing elements (e.g., ink jetnozzles) displaced relative to each other in the media motion directionwhich allows printing of a plurality of rows of dots. Depending uponapplication, the separation between the printing elements in the mediascan direction can correspond to the dot pitch for the desiredresolution (e.g., {fraction (1/300)}th of an inch for 300 dot per inch(dpi) resolution). After one swath or carriage scan, the media can beadvanced by number of rows that the printer is capable of printing inone carriage scan or swath (i.e., the swath height or swath distance).Printing can be unidirectional or bidirectional.

The printing elements of a swath printer are commonly implemented in aprinthead that includes an array of printing elements such as ink jetnozzles. Depending upon implementation, the printhead comprises aremovable printhead cartridge such as those commonly utilized in ink jetprinters. Throughput of a swath type ink jet printer can be increased byutilizing multiple ink jet printhead cartridges to increase the heightof a swath by the additional printhead cartridges. A consideration withmultiple printhead cartridge swath printers is print quality degradationas a result of printhead mechanical tolerances (e.g., the uncertainty ofprinthead cartridge to printhead cartridge positioning, and uncertaintyof variations due to cartridge insertions), and drop velocitydifferences between printhead cartridges, where such degradation canoccur in both bidirectional and unidirectional printing. Mechanicaltolerances of the printhead to print media spacing also causes printquality degradation in bidirectional printing, with one or a pluralityof printhead cartridges.

Factory compensation for each printer manufactured and/or tightmanufacturing tolerance control would address some of the factorscontributing to print quality degradation, but would be extremelydifficult and expensive. Moreover, manufacturing tolerance control mightnot be able to address the effects on the printer of aging andtemperature, particularly as to electronic components of the printer.

SUMMARY OF THE INVENTION

It would therefore be an advantage to provide methods and apparatus fordetecting and compensating misalignments that affect print quality in amultiple printhead cartridge swath printer.

Another advantage would be to provide methods for automaticallydetecting and compensating misalignments that affect print quality in amultiple printhead cartridge swath printer.

In accordance with the invention, an optical sensor including a quadphotodiode detector is utilized to determine the horizontal positions ofprinted vertical test lines which are imaged on the detector inconjunction with horizontal alignment correction, as well as thevertical positions of printed horizontal lines which are imaged on thedetector in conjunction with vertical alignment correction.

BRIEF DESCRIPTION OF THE DRAWINGS

The advantages and features of the disclosed invention will readily beappreciated by persons skilled in the art from the following detaileddescription when read in conjunction with the drawing wherein:

FIG. 1 is a schematic perspective view of the major mechanicalcomponents of a multiple printhead swath printer employing the disclosedapparatus and techniques for aligning the operation of the multipleprintheads thereof.

FIG. 2 is a schematic side elevational sectional view illustrating therelation between the downwardly facing ink jet nozzles and the printmedia of the printer of FIG. 1.

FIG. 3 is a schematic plan view illustrating the general arrangement ofthe nozzle arrays of the printhead cartridges of the printer of FIG. 1.

FIG. 4 is a detail view of a positionally adjustable printhead cartridgeretaining shoe of the swath printer of FIG. 1.

FIG. 5 is a detail view illustrating an example of a cam actuatingmechanism for adjusting the position adjusting cam of the positionallyadjustable printhead cartridge retaining shoe of FIG. 4.

FIG. 6 is a simplified block diagram of a printer controller forcontrolling the swath printer of FIG. 1.

FIG. 7 is a simplified sectional view of the optical sensor of the swathprinter of FIG. 1.

FIG. 8 is a schematic diagram of the quad photodiode detector of theoptical sensor of FIG. 7 that depicts the active areas of thephotodiodes of the quad detector as well as circuitry for processing theoutputs of the quad sensor.

FIG. 9 is a continuous plot of the response of the quad detector andassociated output circuitry as a function of displacement of the imageof a vertical line across the active areas of the quad detector along anaxis that is perpendicular to the length of the line.

FIG. 10 illustrates in exaggerated form a series of printed offsetvertical line segments which are utilized for calibration of the quadsensor outputs for determining horizontal position of vertical test linesegments.

FIG. 11 illustrates in exaggerated form a plurality of vertical testline segments that can be utilized for horizontal alignment of theoperation of the print cartridges of the swath printer of FIG. 1.

FIG. 12 illustrates in exaggerated form a plurality of vertical testline segments that can be utilized for horizontal alignment of theoperation of the print cartridges of the swath printer of FIG. 1 forunidirectional printing.

FIG. 13 illustrates in exaggerated form a plurality of vertical testline segments that can be utilized for horizontal alignment of theoperation of the print cartridges of the swath printer of FIG. 1 forbidirectional printing with a single cartridge.

FIG. 14 illustrates in exaggerated form a series of horizontal test linesegments that can be utilized for vertical alignment of the printcartridges of the swath printer of FIG. 1.

FIGS. 15A through 15C set forth a flow diagram of a procedure forcalibrating the optical sensor of the printer of FIG. 1 for use indetermining horizontal position of vertical test line segments.

FIGS. 16A through 16C set forth a flow diagram of a procedure forhorizontally aligning the operation of the print cartridges of the swathprinter of FIG. 1.

FIGS. 17A through 17G set forth a flow diagram flow diagram of aprocedure for vertically aligning the operation of the print cartridgesof the swath printer of FIG. 1.

DETAILED DESCRIPTION OF THE DISCLOSURE

In the following detailed description and in the several figures of thedrawing, like elements are identified with like reference numerals.

Referring now to FIG. 1, set further therein is a schematic frontalquarter perspective view depicting, by way of illustrative example,major mechanical components of a swath type multiple printhead ink jetprinter employing an alignment system in accordance with the inventionfor calibrating and correcting printhead misalignments, as viewed fromin front of and to the right of the printer.

The printer includes a movable carriage 51 mounted on guide rails 53, 55for translational movement along the carriage scan axis (commonly calledthe Y-axis in the printer art). The carriage 51 is driven along theguide rails 53, 55 by an endless belt 57 which can be driven in aconventional manner, and a linear encoder strip 59 is utilized to detectposition of the carriage 51 along the carriage scan axis, for example inaccordance with conventional techniques.

The carriage 51 supports first and second cartridge retaining shoes 91,92 located at the front of the carriage for retaining substantiallyidentical removable first and second ink jet printhead cartridges C1, C2(sometimes called “pens,” “print cartridges,” or “cartridges”). FIG. 1shows the cartridge C2 in a removed condition, while in FIG. 5 shows thecartridge C2 in its installed position. As depicted in FIG. 2, theprinthead cartridges C1, C2 include downwardly facing nozzles forejecting ink generally downwardly to a print media 61 which is supportedon a print roller 63 that is generally below the printhead cartridges.

For reference, the print cartridges C1, C2 are considered to be on thefront of the printer, as indicated by legends on FIG. 1, while left andright directions are as viewed while looking toward the printcartridges, as indicated by labelled arrows on FIG. 1. By way ofexample, the print media 61 is advanced while printing or positioning soas to pass from beneath the cartridge nozzles toward the front of theprinter, as indicated on FIG. 2, and is rewound in the oppositedirection.

A media scan axis (commonly called the X-axis) as shown in FIG. 3 willbe utilized as a reference for displacement of the media, as well as areference for orientation of a line. The media scan axis can beconsidered as being generally tangential to the print media surface thatis below the nozzles of the printhead cartridges and orthogonal to thecarriage scan axis. In accordance with prior usage, the media scan axisis conveniently called the “vertical” axis, probably as a result ofthose printers having printing elements that printed on a portion of theprint media that was vertical. Also in accordance with known usage, thecarriage scan axis is conveniently called the “horizontal axis”. From apractical viewpoint, if the printed output of the printer of FIG. 1 wereplaced vertically in front of an observer in the same orientation as itwould hang down from the print roller 63, a line printed by with asingle ink jet nozzle and media movement rather than carriage movementwould be “vertical,” while a line printed with a single ink jet nozzleand carriage movement rather than media movement. If the print mediacontaining such lines were positioned horizontally in front of anobserver, the line that extends away from the observer can be consideredvertical by common convention; and the line that extends sideways as tothe observer can be considered horizontal by common convention.Accordingly, in the following description, printed lines aligned withthe media scan axis will be called “vertical” lines, and printed linesaligned with the carriage scan axis will be called horizontal lines.

FIG. 3 schematically depicts the arrangement of the nozzle plates 101,102 of the first and second cartridges C1, C2 as viewed from above thenozzles of the cartridges (i.e., the print media would be below theplane of the figure). Each nozzle plate includes an even number ofnozzles arranged in two columns wherein the nozzles of one column arestaggered relative to the nozzles of the other column. By way ofillustrative example, each nozzle plate is shown as having 50 nozzleswhich are numbered as (a,1) through (a,50) starting at the lower end ofthe nozzle array with nozzles in the left column being the odd numberednozzles and the nozzles in the right column being the even numberednozzles, where “a” represents the printhead cartridge number. Thedistance along the media scan axis between diagonally adjacent nozzles,as indicated by the distance P in FIG. 3 is known as the nozzle pitch,and by way of example is equal to the resolution dot pitch of thedesired dot resolution (e.g., {fraction (1/300)} inch for 300 dpi). Inuse, the physical spacing between the columns of nozzles in a printheadis compensated by appropriate data shifts in the swath print data sothat the two columns function as a single column of nozzles.

The first and second cartridges C1, C2 are side by side along thecarriage scan axis and are offset relative to each other along the mediascan axis, and can be overlapped by as much as about 3 nozzle pitchesalong the media scan axis. As described more fully herein, 2 nozzles ineach pen are logically disabled as selected pursuant to a test patternin order to bring the enabled nozzles closer to proper operationalalignment along the vertical axis.

The second retaining shoe 92 is fixedly secured to the carriage 51,while the first cartridge retaining shoe 91 is pivotally secured to thecarriage 51 by a flexurally deformable, torsion bar like support member93 located at the lower rear part of the retaining shoe 91 near theplane of the nozzle plate of the first printhead cartridge C1 andgenerally parallel to the carriage scan axis. By way of illustrativeexample, the torsion bar like support member 93 is integrally formedwith a backplate 95 of the first cartridge retaining shoe 91 and with aportion of the carriage frame, such that the first retaining shoe 91 ispivotable about a pivot axis PA that passes through the torsion bar likesupport member 93. The top of the first cartridge retaining shoe 91includes a cam follower flange 97 that is structurally integral with theback plate 95 of the retaining shoe. The cam follower flange 97 isbiased rearwardly against a position adjustment cam 111 by a pair ofretaining springs 113 which are connected between the top of thecarriage and the top of the first retaining shoe.

The adjustment cam 111 is rotatably mounted on a pin 115 on the carriage51 and is shaped so as to increase the distance between the cam pin 115and the retaining shoe flange 97 with increased counterclockwiserotation of the cam, as viewed from above. The cam is rotated by a camlever 117 that is integral with the cam, and is engageable with a rightcam stop 119 which limits the clockwise rotation of the cam. Thus, asthe cam lever 117 is rotated counterclockwise away from the cam stop119, the nozzle plate 101 of the first cartridge C1 is rotated downwardabout the pivot axis PA, which aims the nozzle plate of the firstcartridge so that its print area is closer to the print area of thesecond cartridge along the media scan axis. Rotation of the adjustmentcam 111 in the counterclockwise direction as viewed from aboveeffectively positions the first print cartridge C1 closer to the secondprint cartridge C2.

The adjustment cam 111 is controllably moved pursuant to movement of thecarriage 51 while the cam lever 117 is engaged against the downwardlyextending tab 121 a of a conveniently located pivoted adjustment leverarm 121 that can be pivoted so that the tab 121 a is in or above thepath of the cam lever 117 as the cam lever 117 moves with the carriage51. As shown in FIG. 5, the cam actuator arm 121 can be in the proximityof one end of the carriage guide rails, and is actuated by an actuatinglever 123 that is driven by a cam follower 125 which in turn iscontrolled by a cam 127 on the output of a stepper motor 129. A biasspring 131 ensures that the cam actuator arm 121 is fully raised whenactuated to be in the raised position.

It should be appreciated that the cam actuator arm 121 can be controlledby other mechanisms, and that the stepper motor 129 can be used ofadditional purposes. The use of an actuator arm 121 and carriagedisplacement relative to the actuator arm 121 for cam adjustment avoidsthe use a separate servo motor for cam adjustment.

For ease of discussion relative to figures depicting printed lines, themedia scan direction will also be called the vertical direction and thecarriage scan direction will also be called the horizontal direction.Also Thus, the carriage moves to the left when it moves toward the camactuator mechanism, and it moves the right when it moves away from thecam actuator mechanism. FIGS. 1, 3 and 5 generally include indicationsof the left and right directions.

As to swath advance, since the print media 61 enters beneath the printroller and is on top of the print roller when printed, the materialfirst printed is closest to the bottom of the printed image as it hangsdown from the print roller. Accordingly, printed subject matter depictedin the drawings will generally be regarded as having been printed fromthe bottom up, such that the bottom swath will nave been printed first.

An optical sensor 65 is mounted on the carriage 51, for example to theright of and adjacent the first printhead cartridge retaining shoe 91.As discussed further herein, the optical sensor 65 is utilized toprovide position data as to test lines printed on the print media 61which is processed to compensate for horizontal and verticalmisalignments between the first and second printhead cartridges C1, C2.

The movement of the carriage 51, the movement of the print media 61, theoperation of the printhead cartridges C1 and C2, and the adjustment ofthe position of the first printhead cartridge C1 are controlled by aprinter control system as shown in FIG. 6. The control system includesmain controller 31 which controls the actions of the elements in thecontrol system. A media axis drive motor encoder 35 provides informationfor the feedback control of a media axis driver motor 33 which moves theprint roller 63 pursuant to media motion commands from the controller31. Similarly, a carriage axis encoder 39 provides feedback informationfor the feedback control of a carriage scan axis drive motor 33 whichpositions the carriage 51 pursuant to carriage motion commands from thecontroller 31. A multi-channel analog-to-digital (A/D) converter 81receives analog signals based on the outputs of the optical sensor 65and provides digital versions of such analog signals for processing inaccordance with the procedures described further herein. The controllerfurther stores swath raster data into a swath data random access memory(RAM) 41, for example by converting input vector end points to rasterdata or by loading raster data directly from an appropriate source. Thecontroller controls the transfer of swath raster data so as to map theideal bit map in swath RAM to the media by selectively shifting the datain the horizontal sense so that appropriate data from the bitmap arrivesat the print cartridge nozzles when the nozzles are over the appropriateregion of the print media 61 as the carriage traverses in eithercarriage scan direction. This mapping will nominally contain appropriateshifts for each nozzle of each print cartridge to compensate for the tworows of nozzles on each print cartridge, and for the horizontal offsetbetween print cartridges, where such shifts correspond to integralresolution dot pitches. As discussed further herein, nominal swath datashifts are adjusted or corrected to compensate for horizontalmisalignments that are detected pursuant to the procedures describedherein. The controller 31 also sets delays in the print delay controller43 to compensate for horizontal alignment shifts that are less than oneresolution dot pitch, in order to effect fine control of the final dropplacement from the cartridges C1, C2. The print delay controller 43controls print drivers 45 which provide ink firing pulses to the nozzlesof the print cartridges C1, C2.

Swath data to media mapping and print cartridge timing delay correctionscan be implemented, for example, with circuitry and techniques disclosedin commonly assigned co-pending application Ser. No. 07,786,326, filedconcurrently herewith on Oct. 31, 1991, for “FAST FLEXIBLEPRINTER/PLOTTER WITH THETA-Z CORRECTION,” by Chen, Corrigan, andHaselby, incorporated herein by reference.

The print cartridges C1, C2 are mechanically closely aligned pursuant tomanufacturing tolerances, and are finely aligned as disclosed herein sothat the two printhead cartridges C1, C2 cooperatively function like asingle printhead having a single column of 96 nozzles. In this manner,each scan or swath is 96 nozzle pitches wide (as measured in the mediascan direction), and provides for an increased rate of printing ascompared to the use of a single print cartridge. Alignment along thecarriage scan axis is achieved by adjusting the swath data shifts toprovide correction of the integral dot pitch portion of the detectedhorizontal misalignment, and then adjusting the timing of the firing ofthe ink jet nozzles to correct the fractional dot pitch portion of thedetected horizontal misalignment. Alignment in the media scan directionis achieved by selecting the enabled nozzles of the printhead cartridgesC1, C2 to correct the integral nozzle pitch portion of the detectedvertical misalignment, and then adjusting the angular position of thefirst printhead cartridge C1 relative to the second printhead cartridgeC2 via the adjustment cam 111 to correct the fractional nozzle pitchportion of the detected vertical misalignment. These adjustments aremade pursuant to the printing of test line segments, and then measuringthe distances between the test line segments by use of the opticalsensor 65 which is shown in simplified schematic cross-section in FIG.7.

Referring particularly to FIG. 7, the optical sensor includes a housing67 which supports imaging lenses 69, 71 that image a portion of theprint media, for example on a one-to-one basis, onto a quad photodiodedetector 73 located at the top of the housing. An illumination source75, comprising for example an LED, is supported at the bottom of thehousing so as to illuminate the print media that is in the vicinity ofthe optical axis of the imaging lenses 69, 71.

The quad photodiode detector 73 comprises four photodiodes A, B, C, D asschematically depicted in FIG. 8 which also illustrates in block formcircuitry for processing the outputs of the detector photodiodes. Thephotodiodes A, B, C, D are depicted as boxes that represent their activeareas. The active areas of the photodiodes A and B are aligned with thecarriage scan axis as are the active areas of the photodiodes C and D.The active areas of the photodiodes A and C are aligned with the mediaaxis, as are the active areas of the photodiodes B and D. Essentially,the photodiodes are positioned in a square whose sides are aligned withthe carriage scan axis and the media scan axis.

A difference amplifier circuit 77 subtracts the output of the photodiodeD from the output of the diagonally opposite photodiode A, while adifference amplifier circuit 79 subtracts the output of the photodiode Cfrom the output of the diagonally opposite photodiode B. The analogdifference outputs of the difference amplifier circuits 77, 79 areconverted to digital by respective channels of the analog-to-digitalconverter 81, which for illustrative purposes are channels 0 and 1.Alternatively, individual A/D converters can be used for each of thedifference outputs of the difference amplifier circuits 77, 79.Subtraction of the digital versions of the difference amplifier circuitoutputs produces a difference signal H that is effectively thedifference of the outputs of a dual detector wherein the verticallyaligned photodiodes A and C function as one detector and the verticallyaligned photodiodes B and D function as the other detector:

H=CH 0−CH 1=(A−D)−(B−C)=(A+C)−(B+D)  (Equation 1)

where the photodiode detector outputs are represented by the referenceletters used to identify the photodiode detectors, and where the outputsof the A/D converter channels 0 and 1 are respectively represented asCH0 and CH1. The difference signal H shall be called the sensorhorizontal difference signal H since it will be utilized to determinethe horizontal positions of vertical lines.

Analogously, adding the digital versions of the outputs of thedifference amplifier circuits 77, 79 produces a difference signal V thatis effectively the difference of the outputs of a dual detector whereinthe horizontally aligned photodiodes A and B function as one detectorand the horizontally aligned photodiodes C and D function as the otherdetector:

V=CH 0+CH 1=(A−D)+(B−C)=(A+B)−(C+D)  (Equation 2)

The difference signal V shall be called the sensor vertical differencesignal since it will be used to determine vertical position ofhorizontal lines.

FIG. 9 schematically illustrates a continuous plot of the sensorhorizontal difference signal H as a function of displacement of theimage of a vertical line across the active areas of the quad detectoralong the carriage scan axis. As the image begins to fall on the (A+C)side of the quad the difference signal H becomes negative since lessphoto current is developed in these segments. The difference signal Hflattens out as the image is completely on the (A+C) side. The imagethen starts leaving the (A+C) side and entering the (B+D) side. Theresulting difference signal H then becomes positive because more photocurrent is being generated by the (A+C) side and less is being generatedby the (B+D) side. The slope of the center region of the plot of thedifference signal H is ideally linear and is the “useful” region of theoptical sensor. The flat positive flat portion of the plot correspondsto when the image of the line is only on the (B+D) side of the quad.Finally the difference signal H returns to the base line as the lineimage leaves the right side of the quad.

A continuous plot of the sensor vertical difference signal V as afunction of displacement of the image of a horizontal line across theactive areas of the quad detector along the media scan direction wouldbe similar to that shown in FIG. 9, except that image position would bealong the media scan axis. The center of the response of the differencesignal V contains a useful linear region wherein the difference signal Vcan be utilized to sense the vertical position.

The field of view of the optical sensor must be less than the length ofthe line segment to be sensed, plus or minus the uncertainty ofpositioning accuracy along the line, so that the image of the linealways extends beyond the active area of the quad sensor, for example asschematically illustrated in FIG. 8. In other words, the line segmentmust be extend in both directions beyond the field of view of theoptical sensor. The range of the optical sensor linear region about thecenter of the quad detector depends upon magnification, the width of theline segment being imaged, and the width of the individual photodiodesegments of the quad detector. By way of illustrative example, for amagnification of essentially one, horizontal line segments having awidth of 3 resolution dot pitches for vertical position sensing,vertical line segments having a width of 5 resolution dot pitches forhorizontal sensing, and quad photodiode elements larger than the widthsof the lines to be imaged, the range of the linear sensor region isabout 3 resolution dot pitches for vertical position sensing and about 5resolution dot pitches for horizontal position sensing.

Horizontal alignment can be achieved generally as follows. The opticalsensor 65 is initially calibrated to determine a best fit straight linefor the center of the plot or response of the horizontal differencesignal H for the particular sensor so that the horizontal differencesignal H value for a detected vertical line segment can be translatedinto position relative to a predetermined horizontal reference location.A plurality of vertical test line segments are then printed by each ofthe cartridges in each of the carriage scan directions, and thehorizontal positions of the vertical test line segments are determinedrelative to the predetermined reference location by horizontallypositioning the optical sensor so that all of the vertical test linesegments are horizontally within the linear region of the sensor. Themedia is then displaced so that the sensor is respectively verticallyaligned with the nominal vertical centers of the test line segments, andthe horizontal difference signal H values for each of the line segmentsis read and utilized to determined line position in accordance with thebest fit straight line. The differences between relative horizontalpositions of the vertical test line segments are then utilized to adjustswath print data column shifts and the timing of nozzle firing of theprinthead cartridges.

FIG. 10 illustrates in exaggerated form a slightly diagonal calibration“line” that is produced by one of the printheads in a unidirectionalmode in conjunction with a calibration procedure set forth FIGS. 15Athrough 15C for calibrating sensor H difference signal response forhorizontal alignment of the print cartridges.

Referring in particular to the flow diagram of FIGS. 15A through 15C, at311 the print media is rewound and then advanced to a predeterminedvertical start location of a clean unprinted area, so as to remove drivesystem backlash. At 313 the carriage is moved so as to align the opticalsensor with the nominal horizontal center of the calibration line to beprinted later (i.e., horizontally between the ends of calibration line),and at 315 the channel 0 and channel 1 outputs of the A/D converter 81are read. At 317 the value of the sensor horizontal difference signal His calculated in accordance with Equation 1, and the result is stored asa background value for the particular vertical location of the printmedia. At 319 the media is advanced one-half swath (i.e., 48 nozzlepitches along the media scan axis). At 321 a determination is made as towhether the media has been advanced by 26 half-swaths pursuant to step319. If no, control transfers to 315 for the calculation and storage ofanother value of the H difference signal. If the determination at 321 isyes, control transfers to 323.

Pursuant to steps 313 through 321, background values of the horizontaldifference signal H are determined for those locations which will besensed by the optical sensor for sensing the vertical segments of thecalibration line to be printed next.

At 323 the media is rewound past the predetermined vertical startlocation and then advanced to the predetermined vertical start location,so as to remove drive system backlash. At 325 the swath position for thefirst vertical segment CAL1 of the calibration line is set to apredetermined horizontal location corresponding to the horizontal startof the calibration line. At 327 the carriage is scanned in apredetermined direction, and a vertical line having a width of 5resolution dot pitches is printed using 48 nozzles of a predeterminedcartridge starting at the specified swath position. At 329 the specifiedswath position is incremented to offset the next vertical line segmentone resolution dot pitch, for example to the left, and at 331 the mediais advanced by one-half swath. At 333 a determination is made as towhether the media has been advanced 26 times pursuant to step 331. Ifno, control transfers to 327 to print another vertical segment of thecalibration line.

Pursuant to steps 325 through 333, one printhead cartridge is caused toprint in the same scan direction a series of vertical line segments CAL1through CAL26 of substantially constant width, where the vertical linesegments are respectively incrementally offset in a given horizontaldirection by one resolution dot pitch.

At 335, the media is rewound past the predetermined vertical startlocation and then advanced to the vertical start position, so as toremove drive system backlash. At 337 the carriage 51 is moved so as toalign the optical sensor 65 with the nominal horizontal center of thecalibration line that was just printed in pursuant to steps 325 through333 (i.e. in the same horizontal position as in step 313 above). At 339the CH1 and CH1 outputs of the A/D converter are read. At 341 abackground corrected value for the difference signal H is calculated bytaking the difference between the CH0 and CH1 outputs, and subtractingthe previously stored background value of H for the present verticallocation. The background corrected value for H is stored as to thepresent vertical location, and at 343 the print media is advanced byone-half swath. At 345 a determination is made as to whether the mediahas been advance 26 times pursuant to step 343. If no, control transfersto 339 for sampling of further A/D CH0 and CH1 outputs. If yes, controltransfers to 347.

Pursuant to steps 335 through 345, background corrected values of thedifference signal H for vertical line segments of different horizontalpositions are stored in an array, wherein position in the arrayrepresents horizontal distance from an undefined but fixed horizontalreference. Thus, if the 0th entry in the array is for the first verticalline, the horizontal positions of the vertical lines responsible for thearray values can be considered equal to I resolution dot pitches fromthe 0 horizontal position which is defined by the first vertical line,where I corresponds to position in the array. As will be seen later, thearray values are subtracted from each other for correction purposes, andthe actual 0 horizontal location is not pertinent.

At 347 the stored background corrected values of the difference signal Hare correlated with a template function that is similar to the linearregion of the plot of FIG. 9 of the sensor difference signal H. Thetemplate function has fewer data points than the stored array ofbackground corrected values of the difference signal H, and the arrayposition of the difference signal H value at the center of the sequenceof difference signal values that produces the maximum correlation issaved as the maximum correlation index. At 349 the background correctedvalue of the difference signal H corresponding to the maximumcorrelation index and the three background corrected values of thedifference signal H on either side thereof are utilized for a linearregression that determines the best fit straight line:

H=A*HPOS+B  (Equation 3)

where H is the background corrected difference signal H, HPOS ishorizontal image position relative to a fixed 0 horizontal location, Ais the slope, B is the hypothetical value of H according to the best fitline for a vertical line located at the fixed 0 horizontal location. Theslope A will be utilized later to determine the position of verticaltest lines such as those schematically shown in FIG. 11.

The foregoing calibration procedure effectively scans the calibrationline across the sensor in the horizontal direction without horizontallymoving the optical sensor 65 and without having to rely upon theresolution of print carriage positioning mechanism of the printer. Thus,this calibration technique and the technique described further hereinfor determining horizontal position of vertical lines are advantageouslyutilized in a printer that do not have sufficient resolution in itscarriage positioning mechanism, since the resolution of the sensor isrelied on rather than the resolution of the carriage positioningmechanism.

Referring now to FIGS. 16A through 16C, set forth therein is a flowdiagram for providing horizontal alignment pursuant to printing verticaltest line segments such as those schematically depicted in FIG. 11,determining the distances between such vertical test line segments, andutilizing the relative distance information to provide horizontalalignment corrections. At 351, timing delay corrections for thecartridges are set to zero, and swath data shifts are set to theirnominal values that are based on conventionally considered factors suchas nominal offsets between printhead cartridges, dimensions of thecarriage, average ink drop flight times, and so forth. At 353 the mediais positioned to allow printing in a clean area of the media, includingfor example the right margin. At 355 the carriage 51 is positioned at apredetermined horizontal location that is selected so that vertical testline segments to be printed later will be in the linear region of thedifference signal H response for the sensor 65 as positioned at suchpredetermined horizontal location. At 357 the media is rewound and thenadvanced to a vertically align the sensor with the location of thenominal vertical center of the line to be printed later by the cartridgeC1 on the first scan (identified as the line segment VL(1,1) in FIG.11), and an array index I is set to 0. At 359 the sensor differencesignal H is read and stored in a background array as BACKGROUND (I). At361 the media is advanced one-half swath (i.e., one nominal nozzle arrayheight), and at 363 a determination is made as to whether the media hasbeen advanced 3 times pursuant to 361. If no, at 364 the index I isincremented by 1, and control transfers to 359 for another backgroundreading of the sensor difference signal H. If the determination at 363is yes, the media has been advanced 3 times pursuant to 361, controltransfers to 365.

Pursuant to steps 353 through 363, print media background values for thedifference signal H are calculated and stored for the media locationsfor which the sensor difference signal H will later be calculated inconjunction with determining the horizontal positions of vertical testlines printed in accordance with the following.

At 365 the media is rewound and then advanced to the vertical positionwhere vertical line segments will be printed by both cartridges in afirst swath or scan. At 367 each of the cartridges prints a 5 dotresolution pitch wide vertical line segment at the designated horizontallocation, using for example 48 nozzles in each cartridge, in a firstscan direction. At 369 the media is advanced one swath height, and at371 the cartridges print a 5 dot resolution pitch wide vertical linesegment at the designated horizontal location, using for example 48nozzles in each cartridge, in second scan direction that is opposite thefirst scan direction.

Pursuant to steps 365 through 371, vertical test line segments areprinted by each cartridge in each scan direction at a designedhorizontal location. As a result of misalignments relative to thenominal mechanical specifications, the vertical test line segments arehorizontally offset relative to each other, as shown in exaggerated formin FIG. 11, wherein the vertical lines VL(a,b) were printed by thea^(th) cartridge in the b^(th) scan or swath.

At 373, the optical sensor 65 is horizontally positioned at thepredetermined horizontal location as utilized in step 355 above. At 375the print media is rewound and then advanced to vertically align thesensor 65 with the nominal center of the first vertical line segmentprinted by the first cartridge C1, and the array index I is set to 0. At377 the channel 0 and channel 1 outputs of the A/D converter 81 areread, and at 379 a background corrected value for the sensor differencesignal H is calculated, and a value VAL(I) is calculated in accordancewith:

VAL(I)=(H−B)/A  (Equation 4)

where the values for B and A were determined pursuant to the sensorhorizontal position calibration of FIGS. 15A through 15C. VAL(I)represents the horizontal position of the Ith vertical line relative toa 0 horizontal location that is common to all of the vertical lines, butneed not be explicitly defined, as discussed above relative to thecalibration procedure.

At 379 the media is advanced by one-half swath, and at 381 adetermination of made as to whether the media has been advanced 3 timespursuant to 379. If no, at 382 the index I is incremented by 1, andcontrol transfers to 377 for another reading of the sensor differencesignal H for another vertical test line. If the determination at 381 isyes, the media has been advanced 3 times pursuant to 379, controltransfers to 383.

Pursuant to steps 375 through 382, the horizontal positions of thevertical test lines are determined and stored in the array VAL(I).

At 383, the arithmetic mean of the measured horizontal positions of thevertical test lines is calculated, and at 385 the horizontal correctionvalues for each pen in each direction is calculated by subtracting themeasured horizontal position from the mean of the array of horizontalpositions VAL(I). Since the horizontal positions are in units of dotresolution pitches, the correction values are also in dot resolutionpitches. At 387 the integer portion of the horizontal correction valuesare utilized to determine swath data shift corrections for eachcartridge for each scan direction that will remove the coarse amounts ofalignment error. At 389 the fractional part of the horizontal correctionvalues are utilized to calculate cartridge timing delay corrections foreach printhead cartridge for each scan direction that will remove theresidual alignment error remaining after coarse correction. At 391 theexisting swath data shifts and cartridge timing delay corrections areupdated in accordance with the correction values determined at 387 and389. At 393 the steps 353 through 391 are repeated for furtherconvergence until (a) the calculated corrections are sufficiently small,or (b) corrections have been calculated a predetermined number of times.

It should be appreciated that pursuant to the repetition of steps 353through 391, the swath data shifts and cartridge timing delaycorrections are repeatedly updated, with the first update being relativeto nominal data shift values and timing delay corrections of zero as setpursuant to step 351, and updates being made to previously updated datashift values and firing corrections.

At 395 an alignment procedure similar to the foregoing can be executedfor the situation where each printhead cartridge contains a plurality ofindependently controllable primitives that are essentially verticallystacked multiple nozzle printing units, wherein each unit includes aplurality of nozzles. Such alignment would correct for rotationalmisalignment of the cartridges, sometimes called theta-z misalignments.For the example of each printhead cartridge having two primitives, oneprimitive having the top 25 nozzles and the other primitive having thelower 25 nozzles, the alignment procedure would involve printing andposition detecting a total of eight (8) vertical test line segments: onefor each primitive for each direction. Pursuant to calculatedcorrections based on primitives, the data column shift values and timingdelay corrections can be updated as desired, starting with the datacolumn shifts and timing delay corrections as updated at 391 foralignment based on full cartridge vertical lines.

The swath data shifts and cartridge timing delay corrections referred toin the foregoing procedure can achieved, for example, with circuitry andtechniques disclosed in the previously referenced application Ser. No.07/786,326, for “FAST FLEXIBLE PRINTER/PLOTTER WITH THETA-Z CORRECTION,”by Chen, Corrigan, and Haselby.

While the procedure of FIGS. 16A through 16C calculates correctionvalues at 385 based on a single set of vertical test line segments, itshould be appreciated that the horizontal positions of a plurality ofsets of vertical test line segments can be utilized as follows:

1. The horizontal positions VAL(I, J) for a plurality of sets ofvertical test lines located at different swath locations are calculatedgenerally in accordance with steps 351 through 383, where I is the indexfor a set of vertical line segments at a given swath location and isindicative of cartridge and print direction, and J is the index for thesets of test lines. For alignment based on full nozzle height verticallines printed by the two cartridges C1 and C2, then I=0,3; and J=0,N−1,where N sets of vertical lines are being averaged.

2. The average horizontal position AVAL(I) of the vertical lines printedby each pen in each direction is calculated as follows:

AVAL(0)=[VAL(0,0)+VAL(0,1)+. . . +VAL(0,N−1)]/N

AVAL(1)=[VAL(1,0)+VAL(1,1)+. . . +VAL(1,N−1)]/N

AVAL(2)=[VAL(2,0)+VAL(2,1)+. . . +VAL(2,N−1)]/N

AVAL(3)=[VAL(3,0)+VAL(3,1)+. . . +VAL(3,N−1)]/N

3. The arithmetic MEAN of the average horizontal positions and thecorrections for each pen can be calculated as in steps 383 and 385 bysubstitution of the average horizontal positions AVAL(I) for thenon-averaged horizontal positions utilized in steps 383 and 385:

MEAN=[AVAL(0)+AVAL(1)+AVAL(2)+AVAL(3)]/4

CORRECTION C1 DIRECTION RIGHT TO LEFT=MEAN AVAL(0)

CORRECTION C21 DIRECTION RIGHT TO LEFT=MEAN AVAL(1)

CORRECTION C1 DIRECTION RIGHT TO LEFT=MEAN AVAL(2)

CORRECTION C21 DIRECTION RIGHT TO LEFT=MEAN AVAL(3)

4. The foregoing correction values can then be utilized to arrive atswath data shifts and timing delay corrections in steps 387 and 389.

While the foregoing horizontal alignment procedure is directed tohorizontal alignment for bidirectional printing with both cartridges,horizontal alignment for unidirectional printing by both cartridges canbe achieved with procedures similar to those set forth in FIGS. 15Athrough 15C and FIGS. 16A through 16C. After calibration of the opticalsensor 65, background values for the test area are determined, verticaltest lines at a test swath position are printed by both cartridges inthe scan direction for which alignment is being sought, and thehorizontal positions of the test lines relative to each other aredetermined to arrive at swath data shift and/or timing delaycorrections. The test pattern produced would be one of three possibletest patterns as represented by three pairs of vertical lines (a), (b),(c) in FIG. 12. The vertical lines (a) would be printed if thehorizontal alignment between the printhead cartridges was proper. Thevertical lines (b) would result if the print cartridge C2 lags the printcartridge C1 (or the print cartridge C1 leads the print cartridge C2).The vertical lines (c) would result if the print cartridge C1 lags theprint cartridge C2 (or the print cartridge C2 leads the print cartridgeC1). The relative positions of the two vertical test line segments wouldbe utilized to provide swath data shift corrections and cartridge timingdelay corrections.

It would also be possible to provide for horizontal alignment forbidirectional printing by one print cartridge with procedures similar tothose set forth in FIGS. 15A through 15C and FIGS. 16A through 16C.After sensor calibration, background values for the test area aredetermined, first and second vertical test lines at a selected swathlocation are printed in each of the carriage scan directions by thecartridge being aligned, and the horizontal positions of the verticallines relative to each other are determined to arrive at data shiftand/or timing delay corrections. The test pattern produced would be oneof three possible test patterns as represented three pairs of verticallines (a), (b), (c) in FIG. 13. The vertical lines (a) indicate that thespacing between the print cartridge and the print media is proper; thevertical segments (b) indicate that the spacing between the printcartridge and the print media is too small; and the vertical segments(c) indicate that the spacing between the print cartridge and the printmedia is too large. If the spacing is not proper, appropriate swath datashifts and/or cartridge delay corrections can be provided for one orboth of the carriage scan directions.

Vertical alignment can generally be achieved by printing a plurality ofnon-overlapping horizontal test lines with at least one nozzle of eachof the printhead cartridges, utilizing the optical sensor 65 toprecisely detect the vertical positions of the plurality ofnon-overlapping horizontal test line segments relative to a fixedreference, and processing the relative positions to arrive at anadjustment for the position of the first printhead cartridge C1. FIG. 14sets forth by way of illustrative example horizontal test line segmentsHL(1,50), HL(2,1), HL(2,5), which are respectively printed by nozzle 50of the first print cartridge, the nozzle 1 of the second printcartridge, and the nozzle 5 of the second cartridge; and FIGS. 17Athrough 17G set forth a flow diagram of a procedure for achievingvertical alignment pursuant to printing and detecting the relativepositions of such lines. It should be appreciated that the horizontalline segments are identified in the form of HL(c,d) where c identifiesthe cartridge number and d identifies the nozzle. Pursuant to the flowdiagram of FIGS. 17A through 17G, the adjustment cam 111 is rotated to aknown position, background values for the sensor difference signal V arecalculated for locations on the print media where the sensor will bepositioned for detecting the positions of horizontal test line segmentsto be printed later, the horizontal test line segments are printed, andthe positions of the horizontal test line segments are determined byincrementally moving the print media relative to a fixed start positionand calculating a value for the sensor difference signal V at eachincremental position.

Referring in particular to FIGS. 17A through 17G, at 511 the carriage ismoved so that the cam lever 117 is to the right of the cam actuator arm121 which is in the raised position, and at 513 the cam actuator arm 121is lowered. At 515 the carriage 51 is moved to the left so that the camlever 117 is engaged by the cam actuator arm 121 and rotated against theright cam stop 119. At 517 the carriage 51 is moved to the right byone-quarter inch to disengage the cam actuator arm 121 from the camlever 117, and at 519 the cam actuator arm 121 is raised. At 521 thecarriage 51 is moved to the left so that the cam lever 117 is to theleft of the actuator arm 121, and at 523 the actuator arm 121 islowered. At 525 the carriage 51 is moved to the right to remove linkagebacklash, and to move the cam lever 117 from the cam stop 19 to a knowninitial position relative to the carriage 51. At 527 the carriage 51 ismoved to the left by one-quarter inch to disengage the cam lever 117from the cam actuator arm 121, and at 529 the cam actuator arm 121 israised.

Pursuant to steps 511 through 525, the cam lever 117 is set to aninitial known position with respect to the carriage 51. The carriageposition along the carriage scan axis after moving the cam lever 117 tothe initial known position is saved as a carriage reference position forlater use to advance the cam lever further away from the right cam stop119 (i.e., counterclockwise as viewed from above), as described furtherherein. Generally, the final carriage position corresponding to thefinal adjusted cam lever position will be based on the saved carriagereference position and a calculated additional carriage displacementnecessary to move the cam lever 117 to its final adjusted position.Thus, for the final adjustment, the cam actuator arm 121 will be raisedand the carriage 51 will be positioned so that the cam lever is to theleft of the actuator arm 121. The cam actuator arm 121 would then belowered, and the carriage 51 would be moved to the right to the finalcarriage position for cam adjustment, so as to move the cam lever 117 ina counterclockwise direction, as viewed from above, from the initialknown position.

At 537 the carriage is positioned so that the optical sensor 65 ispositioned over the location on the print media 61 of the nominalhorizontal center of the horizontal line HL(2,1) line to be printedlater. At 539 the print media 61 is rewound past a predetermined startlocation that will be used for all sensor detection operations, and isthen advanced to the predetermined start location so as to removebacklash in the media drive gear train. The predetermined start locationis selected so that all of the horizontal test lines will be close tothe center of a vertical scan of 50 resolution dot pitches, for example.At 541 the channel 0 and channel 1 outputs of the A/D converter 81 areread, and a value of the background value of the difference signal V iscalculated pursuant to Equation 2 for the particular vertical positionof the print media 81. At 543 the background value for the presentvertical location is stored in an array for the horizontal line HL(2,1),and at 545 the print media 61 is advanced by one resolution dot pitch.At 547 a determination is made as to whether the media 61 has beenadvanced 50 resolution dot pitches since the media was positioned at thepredetermined start location in step 537. If no, control returns to 541for calculation of further media background values of the sensordifference signal V. If the determination at 547 is yes, the media 61has been advanced 50 times, the process continues to step 549.

Pursuant to steps 537 through 547, background values of the sensordifference signal V are calculated for each of the positions on themedia for which values of the sensor difference signal V will becalculated in conjunction with determining the position of thehorizontal line HL(2,1) to be printed later. The background values willlater be subtracted from the values of the sensor difference signal Vcalculated for the same locations for determining the position of thehorizontal line HL(2,1) after such line has been printed.

Steps 549 through 559 are similar to steps 537 through 547, and areperformed to obtain media background values of the sensor differencesignal V for the media positions for which values of the sensordifference signal V will be calculated in conjunction with determiningthe position of the horizontal line HL(1,50).

Steps 561 through 571 are also similar to steps 537 through 547, and areperformed to obtain media background values of the sensor differencesignal V for the media positions for which values of the sensordifference signal V will be calculated in conjunction with determiningthe position of the horizontal line HL(2,5).

At 572 the media drive is backed and then advanced to the location wherethe test lines are to be printed. At 573 one nozzle wide horizontallines corresponding to the test lines are printed by the nozzles (2,5),(1,50), and (2,1) in one scan, and at 575 the print media is advanced byone resolution dot pitch. At 577 a determination is made as to whetherthe one nozzle wide test lines have been printed three times. If no,control returns to 573 to print further one nozzle wide test lines atthe same horizontal locations. If the determination at 577 is yes, theone nozzle wide test lines have been printed three times, controltransfers to 353. Essentially, the steps 573 through 577 causes theprinting of horizontal test lines which are three nozzles wide asmeasured in the media scan direction, which provides for a largeroptical sensor output.

At 579 the carriage is positioned so that the optical sensor 65 ispositioned over the location of the nominal horizontal center of thehorizontal test line segment HL(2,1). At 581 the print media 61 isrewound past the predetermined start location utilized for all sensordetection operations, and is then advanced to the predetermined startlocation so as to remove backlash in the media drive gear train. At 583the channel 0 and channel 1 outputs of the A/D converter 81 are read,and a background corrected value for the difference signal V iscalculated. At 585 the background corrected difference value for thepresent vertical media location is stored in the result array for thehorizontal line HL(2,1), and at 587 the print media 61 is advanced byone resolution dot pitch. At 589 a determination is made as to whetherthe media 61 has been advanced 50 resolution dot pitches since the mediawas positioned at the predetermined start location in step 579. If not,control returns to 583 for calculations of further values of the sensordifference signal V.

If the determination at 589 is yes, the media has been advanced 50times, at 591 the background corrected difference signal V data iscorrelated with a signal template that resembles the useful centerportion of an ideal curve of the difference signal V. The templatefunction has fewer data points than the stored array of backgroundcorrected values of the vertical difference signal V, and the arrayposition of the vertical difference signal value at the center of thesequence of background corrected difference signal values that producesthe maximum correlation is saved as the maximum correlation index. At593 the background corrected value of the vertical difference signal Vcorresponding to the maximum correlation index and the three backgroundcorrected values of the difference signal V on either side thereof areutilized for a linear regression that determines the best fit straightline:

V=A*VPOS+B  (Equation 5)

where V is the background corrected vertical difference signal Vcalculated at step 583, VPOS is vertical line position relative topredetermined vertical start location, A is the slope, B is thehypothetical value of V according to the best fit line for a horizontalline located at the predetermined vertical start location. At 595 thevertical position for the line HL(2,1) relative to the predeterminedvertical start location is set equal to −B/A, which follows from settingV equal to zero in Equation 5 above.

Pursuant to steps 579 through 595, values of the sensor verticaldifference signal V are determined for locations spaced one resolutiondot pitch apart over a vertical range that extends above and below thehorizontal test line segment HL(2,1) in order to calculate a verticalposition for the line relative to the predetermined vertical startlocation.

Steps 597 through 612 are performed to determine the vertical positionof the line HL(1,50) relative to the predetermined vertical startlocation, and are similar to steps 579 through 595.

Steps 613 through 629 are performed to determine the vertical positionof the line HL(2,5) relative to the predetermined vertical startlocation, and are also similar to steps 579 through 595.

At 631 a pen correction value PEN CORR is calculated by subtractingV(1,50) from V(2,0), and at 633 a gear train correction value GEAR CORRis calculated by dividing the nominal distance between the nozzles (2,5)and (2,1) (i.e., 4 dot pitches) by the calculated distance between suchnozzles. At 635 the pen correction value PEN CORR calculated at 631 ismultiplied by the gear correction value GEAR CORR to arrive at a finalpen correction value PEN CORR. From the calculations for the final pencorrection value PEN CORR, it should be appreciated that a positivevalue of PEN CORR indicates no overlap between the cartridge C1 nozzlesand the cartridge C2 nozzles, while a negative value of PEN CORRindicates overlap.

The gear train correction value GEAR CORR corrects for cyclical gearerrors in the media drive mechanism that could result in a slightlydifferent gear ratio in the region of the horizontal test lines that arebeing measured. It is a second order effect but can be normalized usingthe measurement procedure described above so as to reference themisalignment distance (which is between the horizontal lines HL(2,1) andHL(1,50)) to the measured gear compensation distance (which is betweenHL(2,1) and HL(2,5)), rather than referencing the misalignment distanceto an absolute rotation of the media drive motor encoder.

At 637, the lowermost enabled nozzles for the cartridges C1, C2 and aPEN MOTION value are determined by comparing the final pen correctionvalue PEN CORR with certain empirically determined limits.

If PEN CORR is greater than or equal to 1.0 and less than 4.0, Case 1applies: low nozzle for cartridge 2 is (2,1), low nozzle for cartridgeC1 is (1,3), and PEN MOTION is equal to −(PEN CORR−1).

If PEN CORR is greater than or equal to 0.0 and less than 1.0, Case 2applies: low nozzle for cartridge 2 is (2,1), low nozzle for cartridgeC1 is (1,2), and PEN MOTION is equal to −PEN CORR.

If PEN CORR is greater than or equal to −1.0 and less than 0.0, Case 3applies: low nozzle for cartridge 2 is (2,1), low nozzle for cartridgeC1 is (1,1), and PEN MOTION is equal to −(PEN CORR+1).

If PEN CORR is greater than or equal to −2.0 and less than −1.0, Case 4applies: low nozzle for cartridge 2 is (2,2), low nozzle for cartridgeC1 is (1,1), and PEN MOTION is equal to −(PEN CORR+2).

If PEN CORR is greater than or equal to −3.0 and less than −2.0, Case 5applies: low nozzle for cartridge 2 is (2,3), low nozzle for cartridgeC1 is (1,1), and PEN MOTION is equal to −(PEN CORR+3).

Pursuant to Cases 2 through 5 in step 637, appropriate sets of nozzlesare selected for the printhead cartridges such that the verticaldistance between the uppermost enabled nozzle of the cartridge C1 andthe lowermost enabled nozzle of cartridge C2 is greater than or equal to1 nozzle pitch but less than 2 nozzle pitches. This effectivelyimplements the integer portion of the calculated correction. Thefractional part of the calculated correction will be implemented byadjusting the position of the cartridge C1 so that the vertical distancebetween the uppermost enabled nozzle of the cartridge C1 and thelowermost enabled nozzle of cartridge C2 is substantially one nozzlepitch. Thus, as to Cases 2 through 5, the cam adjustment will be lessthan one nozzle pitch. Effectively, if there is overlap or if there isnot overlap and the vertical distance between the top nozzle of thecartridge C1 and the bottom nozzle of the cartridge C2 is less than onenozzle pitch, nozzle selection is utilized in such that the verticaldistance between the uppermost enabled nozzle of the cartridge C1 andthe lowermost enabled nozzle of cartridge C2 is greater than or equal to1 nozzle pitch but less than 2 nozzle pitches. Cam adjustment providesfor the residual correction.

Case 1 is a special case where the nozzles of the cartridges C1, C2 donot overlap along the vertical direction with the cam in the referenceposition, and the cam adjustment must be greater than one nozzle pitch.

By way of illustrative example, a nominal nozzle overlap betweencartridges of about 1 to 2 nozzle pitches and a total cam actuatedmechanical adjustment range for the print cartridge C1 of about 2½nozzle pitches provide for a total adjustment range of about ±4 nozzlepitches to correct for print cartridge manufacturing tolerances,retaining shoe manufacturing tolerances, and cartridge insertiontolerances.

The total equivalent adjustment of the printhead cartridge C1 to thecartridge C2 is thus achieved by (a) selecting the appropriate series ofnozzles for use and (b) mechanically moving the print cartridge C1 toremove any misalignment remaining after nozzle selection. Only Case 1 ofstep 637 requires moving the print cartridge C1 more than one nozzlepitch toward the print cartridge C1, since Case 1 is for the situationwhere the cartridges are too far apart along the media scan axis andcorrection by nozzle selection is not possible.

For the arrangement shown in FIG. 14, Case 4 would apply since the PENCORR for the lines HL(2,1) and HL(1,50) as shown would be greater than−2.0 and less than −1.0 resolution dot pitches. PEN CORR would be apositive fraction less than 1.0, which means that nozzle (1,48) will bebrought closer to nozzle (2,2) along the media scan axis.

At 639 the high nozzles for each cartridge are determined by adding 47to the low nozzle numbers, and at 641 the carriage travel distance CAMDIST in linear encoder counts for cam adjustment is calculated bymultiplying PEN MOTION by ARM CONSTANT, where ARM CONSTANT is a constantthat converts PEN MOTION, which is the number of nozzle pitches thatcartridge C1 is to be brought closer along the media scan axis to thecartridge C1, to carriage displacement required to move the cam lever117 with the cam actuator arm 121. ARM CONSTANT can be determinedanalytically or empirically, and the linear relation between CAM DISTand PEN MOTION is based on the cam 111 being designed so that anessentially linear relation exists between (a) carriage motion whilemoving the cam arm and (b) effective nozzle displacement along the mediascan axis.

Alternatively, CAM DIST can be non-linearly related to PEN MOTION, andsuch relation can be derived analytically or empirically. Empirical datacan be produced, for example, by incrementally positioning the campursuant by moving the carriage to known locations spaced by apredetermined number of encoder counts and measuring the resultingvalues of PEN CORR at each of the carriage locations. Pursuant to theempirical data, a function or look-up table scheme can be produced torelate cam moving carriage motion to change in nozzle distance.

At 643, with the cam actuator in the raised position, the carriage ismoved to the left side thereof. At 645 the cam actuator arm is lowered,and at 649 the carriage is moved to the right to a position equal to thecarriage reference position saved previously at step 525 and the CAMDIST value calculated above in step 641. This in effect moves the cam anamount corresponding to the carriage movement of CAM DIST, since inabsolute scan axis encoder position the cam was left at the referenceposition saved at step 525. At 651 the carriage is moved left by ¼ of aninch so as to clear the cam arm from the cam adjustment actuator, and at653 the cam adjustment actuator arm is raised. The vertical axis ormedia axis alignment procedure is then completed.

In the foregoing procedure for vertical alignment, the logically enablednozzles are selected to correct the calculated misalignment to theclosest integral nozzle pitch, except for Case 1 in step 637, and anyremaining fractional dot pitch correction, as well as the correction forCase 1, is made in a fixed direction by physical carriage dimensionaladjustment. It is also contemplated that the vertical alignment can beachieved by using only selection of logically enabled nozzles, forexample in a swath printer having a sufficiently high resolution so thatthe residual fractional dot pitch errors do not produce objectionableprint quality, and further having mechanical tolerances that assureoverlapping or non-overlap with the vertical distance between the topnozzle (1,1) of the cartridge C1 and the bottom nozzle (2,50) of thecartridge C2 being less than one nozzle pitch. The enabled nozzles wouldthen be selected as desired so that the enabled nozzles arenon-overlapping, for example on the basis of print quality, achieving aremaining error of less than one nozzle pitch, or achieving a verticaldistance between the top enabled nozzle of the cartridge C1 and thebottom enabled nozzle of the cartridge C2 that closest to one nozzlepitch, even if the resulting vertical distance is greater than onenozzle pitch.

While the foregoing disclosure sets forth one procedure for detectingrelative positions of horizontal test line segments and anotherprocedure for detecting relative positions of vertical test linesegments, it should be appreciated that the procedure for horizontaltest lines can be adapted for vertical test lines, and the procedure forvertical test lines can be adapted to horizontal test lines, dependingupon the resolution and accuracy of the carriage positioning and mediapositioning mechanisms with which the procedures are implemented. Itshould also be appreciated as to detecting the positions of horizontaland vertical test lines that other types of sensors could be utilized,including for example charge coupled device (CCO) arrays. As a furtheralternative one dual detector could be utilized for detecting thepositions of horizontal lines, and another dual detector could beutilized for detecting vertical lines.

While the disclosed apparatus and techniques for alignment of printelement arrays have been discussed in the context of an ink jet printerhaving two printheads, the disclosed apparatus and techniques can beimplemented with ink jet printers which have more than two printheads ornozzle arrays arranged to increase swath height, and also with othertypes of raster type printers such as pin type impact printers. Further,the horizontal alignment techniques can be implemented to correct forbidirectional printing errors of a single print element array printersuch as a single cartridge ink jet printer.

The foregoing has been a disclosure of apparatus and techniques forefficiently and reliably achieving alignment of the printhead cartridgesof a multiple printhead swath printer, which provides for improvedcontinuous graphics throughput with high print quality. The disclosedapparatus and techniques in particular provide for high print qualitywith bidirectional printing with a multiple printhead ink jet printer.The disclosed apparatus and techniques advantageously avoid extremelytight mechanical tolerances, compensate for processing variations aswell as voltage and temperature effects of electrical components, andcompensate for print cartridge mounting errors that result frominsertion of the cartridges into the cartridge retaining shoes whichcannot be corrected by manufacturing tolerance control.

Although the foregoing has been a description and illustration ofspecific embodiments of the invention, various modifications and changesthereto can be made by persons skilled in the art without departing fromthe scope and spirit of the invention as defined by the followingclaims.

What is claimed is:
 1. A method of calibrating and correcting alignmentdifferences between a plurality of different print cartridges in a swathprinter having a carriage which traverses along a carriage scan axis forprinting on media movable along a media advance axis, comprising:printing at least one line segment from a first print cartridge;printing at least another line segment from a second print cartridge sothat the one line segment and the another line segment are spaced apartfrom each other and are substantially parallel to one of said carriagescan axis and said media advance axis; optically scanning the relativepositions of the one line segment and the another line segment todetermine any offset from a predetermined calibration line; andproviding an alignment correction based on said optically scanning step.2. The method of claim 1 wherein said printing steps create the one linesegment and the another line segment as both horizontal line segmentsand/or as both vertical line segments in order to provide an alignmentcorrection in the form of data shifting between nozzles.
 3. The methodof claim 1 wherein said printing steps create the one line segment andthe another line segment as both horizontal line segments and/or as bothvertical line segments in order to provide an alignment correction inthe form of changing a selection of nozzles to be activated.
 4. Themethod of claim 1 wherein said printing steps create the one linesegment and the another line segment as both horizontal line segmentand/or vertical line segments m order to provide an alignment correctionin the form of a timing change for sending an activation pulse to thenozzles.
 5. The method of claim 1 wherein said printing steps includeprinting at least one pair of vertical line segments in one carriagescan direction and another different pair of vertical line segments inan opposite carriage scan direction in order to provide an alignmentcorrection for bidirectional printing.